Skip to content

Conversation

cjqzhao
Copy link
Contributor

@cjqzhao cjqzhao commented Jul 7, 2025

Add exit_idle to LbPolicy Trait and Child Manager.

@dfawley @easwars


fn exit_idle(&mut self, channel_controller: &mut dyn ChannelController) {
todo!()
// TODO(cjzhao): add exit idle logic once everything has been merged in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the todo! macro accepts a string that is printed when it is encountered, which might be nicer. Just todo!("implement exit_idle") seems fine.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can delete the comment here in that case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines 147 to 148
/// Called by policy when it needs to exit the idle state and start connecting
/// to subchannels.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a method on the policy, so it is called by the channel when it wants the lb policy to connect.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@dfawley dfawley added this to the grpc-next milestone Jul 8, 2025
todo!();
}

fn exit_idle(&mut self, channel_controller: &mut dyn ChannelController) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the CI error that happened for this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


fn exit_idle(&mut self, channel_controller: &mut dyn ChannelController) {
todo!()
// TODO(cjzhao): add exit idle logic once everything has been merged in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can delete the comment here in that case.

/// WorkScheduler's request_work method.
fn work(&mut self, channel_controller: &mut dyn ChannelController);

/// Called by the channel when a LbPolicy goes Idle and the channel
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
/// Called by the channel when a LbPolicy goes Idle and the channel
/// Called by the channel when an LbPolicy goes idle and the channel

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@cjqzhao cjqzhao force-pushed the exitidletrait branch 2 times, most recently from 7a08a93 to 77588f0 Compare August 7, 2025 16:48
@dfawley dfawley changed the title Add Exit Idle to LbPolicy Trait feat(grpc): add exit_idle to LbPolicy trait Aug 7, 2025
@cjqzhao cjqzhao force-pushed the exitidletrait branch 2 times, most recently from c9cc1e6 to b0aa1ee Compare August 8, 2025 20:46
@dfawley dfawley merged commit b4c81fc into hyperium:master Aug 8, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants